package com.openharmony.filepicker.filetype;


import com.openharmony.filepicker.ResourceTable;

public class ExecutableFileType extends FileType {

    public ExecutableFileType() {
        this.setFileType("Executable");
        this.setFileIconResId(ResourceTable.Media_ic_exec_file_picker);
    }

    @Override
    public boolean verify(String fileName) {
        boolean isHasSuffix = fileName.contains(".");
        if (!isHasSuffix) {
            return false;
        }
        String suffix = fileName.substring(fileName.lastIndexOf(".") + 1);

        switch (suffix) {
            case "apk":
            case "app":
            case "bat":
            case "cgi":
            case "com":
            case "exe":
            case "gadget":
            case "jar":
            case "wsf":
                return true;
            default:
                return false;
        }
    }

}
